/**
 * 
 */
package com.jeesuite.jerseydemo.rest.controller;

import java.util.ArrayList;
import java.util.List;

import javax.inject.Singleton;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.springframework.stereotype.Component;

import com.jeesuite.jerseydemo.rest.dto.IdNamePair;

/**
 * @description <br>
 * @author <a href="mailto:vakinge@gmail.com">vakin</a>
 * @date 2016年10月25日
 */
@Component
@Singleton
@Path("/")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
public class DemoController {

	@GET
	@Path("getOptions")
	public List<IdNamePair> findAllPostCategory() {
		List<IdNamePair> result = new ArrayList<>();
		result.add(new IdNamePair(1000, "北京"));
		result.add(new IdNamePair(1001, "上海"));
		result.add(new IdNamePair(1002, "深圳"));
		return result;
	}

}
